package com.kingja.loadsir.callback;


import ohos.agp.components.Component;
import ohos.app.Context;



public class SuccessCallback extends Callback {
    public SuccessCallback(Component view, Context context, OnReloadListener onReloadListener) {
        super(view, context, onReloadListener);
    }

    @Override
    protected int onCreateView() {
        return 0;
    }

    public void hide() {
        obtainRootView().setVisibility(Component.INVISIBLE);
    }

    public void show() {
        obtainRootView().setVisibility(Component.VISIBLE);
    }

    public void showWithCallback(boolean successVisible) {
        obtainRootView().setVisibility(successVisible ? Component.VISIBLE : Component.INVISIBLE);
    }

}
